<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .red{color: red;}
        .gray{color: gray;}
        .blue{color: blue;}
        .set{background-color: palegoldenrod;
        }
    </style>
</head>
<body>
    <div class="root">
        {{msg}}
        <div :class="['blue','set']">这里</div>
        <input class="" v-model="msg">
        <input class="" :value="msg" @keyup="kepdata">
        <button @click="getinfo(222,$event)">xxx</button>
    </div>
</body>
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
<script>
    var root = new Vue({
        data:{
            msg:'99',
        },
        methods: {
            getinfo(e){
                e.stopPropagation();
                e.preventDefault()
                console.log(e);
            },
            kepdata(e){
                console.log(e,'xxx');
            }
        },
    })
    root.$mount('.root')
    // let obj = {name:'aaa', sex:18}
    // let obj2 = { name:'bbb',sex:18}
    // Object.defineProperty(obj2,'kaix',{
    //     get:function(){
    //        return '88888'
    //     },
    //     set:function(value){
    //         obj.sex = value 
    //         console.log('触发也set');
    //     }
    // })
    // console.log(obj);
</script>
</html>